﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Genetic;

namespace Genetic
{
    public delegate double fitnessCallback(TetrisChromosome tCh);
    public class TetrisFitnessDelegateFunction : IFitnessFunction
    {
        public TetrisFitnessDelegateFunction(fitnessCallback c)
        {
            _callback = c;
        }

        public double Evaluate(IChromosome chromosome)
        {
           return _callback((TetrisChromosome)chromosome);
        }

        private fitnessCallback _callback;
    }
}
